{include file="install.header.html"}
<div id="main" class="main w clearfix">
  <div class="title">
  	{$lang.install_check}
  </div>
  <div class="content">
    <div class="pr-title">
      <h3>{$lang.check_env}</h3>
    </div>
    <div class="check-box bgf">
      <table>
        <tr>
          <th width="35%">{$lang.item_name}</th>
          <th width="35%">{$lang.required_env}</th>
          <th>{$lang.current_server}</th>
        </tr>
        {foreach from=$check_env.detail item=ev key=ek}
        <tr>
          <td>{$lang.{$ek}}</td>
          <td>{$ev.required}</td>
          <td><span class="ico {$ev.result}"></span><span>{$ev.current}</span></td>
            </td>
        </tr>
        {/foreach}
      </table>
    </div>
    <div class="pr-title mt10">
      <h3>{$lang.file_and_folder_priv}</h3>
    </div>
    <div class="check-box bgf">
      <table>
        <tr>
          <th width="35%">{$lang.file_and_folder}</th>
          <th width="35%">{$lang.required_priv}</th>
          <th>{$lang.current_priv}</th>
        </tr>
        {foreach from=$check_file.detail item=ev key=ek}
        <tr>
          <td>{$ev.file}</td>
          <td>{$lang.writable}</td>
          <td class="clearfix"><span class="ico {$ev.result}"></span><span>{$ev.current}</span></td>
        </tr>
        {/foreach}
      </table>
    </div>
    
    {if $messages}
    <ul class="messages">
      {foreach from=$messages item=msg}
      <li>{$msg}</li>
      {/foreach}
    </ul>
    {/if}
    <div class="btn-box" style="border: 0;">
      <form action="{url route='install/config'}" method="POST" id="post_form">
        {foreach from=$hiddens item=hv key=hk}
        <input type="hidden" name="{$hk}" value="{$hv}" />
        {/foreach}
        <input type="hidden" value="{$compatible}" name="compatible" />
        <input class="btn-normal" type="button" value="{$lang.prev}" onclick="window.history.go(-1);" />
        <input class="btn-normal ml10" type="button" id="submit_button" value="{$lang.next}"  />
        {if !$compatible}
        <input type="button" class="btn-normal ml10" value="{$lang.recheck}" onclick="window.location.reload();" />
        {/if}
      </form>
    </div>
  </div>
  <div class="clear"></div>
</div>
<script type="text/javascript">
$(function(){
  $('#submit_button').click(function(){
	  if(!$('input[name="compatible"]').val()) {
		  alert('{$lang.incompatible}');
		  return false;
	  }
	  window.location.href = $('form').attr('action');
  });
});
</script> 
{include file="install.footer.html"}